#!/usr/bin/python3
#coding=utf-8


import json

"""
@:exception 成功回调
@:param data
@:return str(json)
"""
def successBack(data):
    obj = {
        'code':'000000',
        'msg':'请求成功',
        'data':data
    }
    return str(json.dumps(obj))

"""
@:exception 错误回调
@:param data
@:return str(json)
"""
def errorBack(data):
    obj = {
        'code':'000000',
        'msg':'请求成功',
        'data':data
    }
    return str(json.dumps(obj))


# 统一返回处理
def callBack(code,data,msg):
  res = {
    'code': code,
    "msg": msg,
    "data":data
  }
  return res
